function outSize = getOutputSize(inputsize)
firstlayer_fsize = 5;
lastlayer_fsize = 9;
lastlayer_stride = 3;
lastlayer_pad = 4;

inputsize = inputsize - (firstlayer_fsize - 1); % for first convplution layer,kenel size is 5*5
outSize = (inputsize-1) * lastlayer_stride + lastlayer_fsize-2*lastlayer_pad;